<style type="text/css">
div.form label {
    width: 150px;
    float: left;
}
</style>
<div class="form">

    <div class="row">
        <?php echo CHtml::activeLabel($model->widget,'name'); ?>
        <?php echo CHtml::link($model->widget->name, array('/Cms/admin/widget/update', 'id'=>$model->widget_id, 'layout'=>''), array('target'=>'_parent')); ?>
    </div>

    <div class="row">
        <?php echo CHtml::activeLabel($model->widget,'type'); ?>
        <?php echo $model->widget->typeText; ?>
    </div>

    <div class="row">
        <?php echo CHtml::activeLabel($model,'status'); ?>
        <?php echo CHtml::image(Yii::app()->theme->baseUrl.'/images/'.($model->status ? 'success.gif' : 'view_del.gif'), $model->status); ?>
    </div>

    <div class="row">
        <?php echo CHtml::activeLabel($model,'name'); ?>
        <?php echo $model->name; ?>
    </div>

    <div class="row">
        <?php echo CHtml::activeLabel($model,'creation_datetime'); ?>
        <?php echo Yii::app()->getDateFormatter()->formatDateTime(strtotime($model->creation_datetime)); ?>
    </div>

    <div class="row">
        <?php echo CHtml::activeLabel($model,'last_update'); ?>
        <?php echo Yii::app()->getDateFormatter()->formatDateTime(strtotime($model->last_update)); ?>
    </div>
    
    <div class="row buttons">
        <?php echo CHtml::link('Edit', array('/Cms/admin/widgetLayout/update', 'id'=>$model->id, 'layout'=>''), array('target'=>'_parent'));?>
        <?php echo CHtml::ajaxLink('Delete',
            array('/Cms/admin/widgetLayout/update', 'id'=>$model->id),
            array(
                'success'=>'js:function(){parent.location = parent.location;}',
            ),
            array(
                'confirm'=>'Are you sure you want to delete this layout',
            )
        );?>
    </div>

</div><!-- form -->
<script type="text/javascript">
$(function(){
   //resize fancybox
    var height = $('body').height()+26;//padding 20px
    $('#fancybox-content', parent.document).height(height);
    parent.$.fancybox.center();
});
</script>